package com.kvn.blade.core.decoder;

/**
 * @author wzy
 * @date 2017年11月17日 上午11:04:40
 */
public class ByteBufJsonDecoder implements Decoder {
    private static final JsonDecoder jsonDecoder = new JsonDecoder();

	@Override
	public <T> T decode(Object arg, Class<T> returnClass) {
		byte[] msg = (byte[]) arg;
		String rlt = new String(msg);
		System.out.println("ByteBufJsonDecoder==>" + rlt);

		return jsonDecoder.decode(rlt, returnClass);
	}

}
